<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>AUI快速完成布局</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
</head>
<body>
    <section class="aui-content-padded">
        <div class="aui-btn" tapmode onclick="openActionsheet()">打开底部选择器</div>
    </section>
    <section class="aui-content-padded">
        <p>点击了第<strong class="aui-text-danger" id="button-index"></strong>个按钮(buttonIndex)</p>
        <p>当前点击按钮的标题为：<strong class="aui-text-info" id="button-title"></strong>(buttonTitle)</p>
    </section>
</body>
<script type="text/javascript" src="../script/api.js" ></script>
<script type="text/javascript" src="../script/aui-actionsheet.js" ></script>
<script type="text/javascript">
    apiready = function(){
        api.parseTapmode();
    }
    var actionsheet = new auiActionsheet();
    function openActionsheet(){
        actionsheet.init({
            frameBounces:true,//当前页面是否弹动，（主要针对安卓端）
            title:"这里是标题",
            cancelTitle:'这里取消按钮',
            destructiveTitle:'红色警告按钮',
            buttons:['拍照','图库选择']
        },function(ret){
            if(ret){
                document.getElementById("button-index").textContent = ret.buttonIndex;
                document.getElementById("button-title").textContent = ret.buttonTitle;
            }
        })
    }
</script>
</html>